package entity;

import io.gitee.horizon007.webspider.annotation.Context;
import io.gitee.horizon007.webspider.transformer.AttributeTransformer;
import io.gitee.horizon007.webspider.transformer.Transformer;
import lombok.Data;

@Data
public class JdSearchItem {

    @Context(transformer = Transformer.ATTR)
    @AttributeTransformer.AttributeName("data-sku")
    private String sku;

    @Context(selector = ".p-img img", transformer = Transformer.ATTR)
    @AttributeTransformer.AttributeName("data-lazy-img")
    private String img;

    @Context(selector = ".p-name em")
    private String name;

    @Context(selector = ".p-price i[data-price]")
    private String price;

}
